package cn.foolishbird.business.tool.task;

import java.util.List;

/**
 * @author Eric
 * @version 1.0
 * @date 2020-11-16
 */
public abstract class SingleThreadTaskIterator<T> extends AbstractTaskIterator<T> {

    @Override
    public void iterator() {
        List<T> list = next();
        while (null != list && !list.isEmpty()) {
            for (T t : list) {
                execute.execute(t);
            }
            list = next();
        }
    }

}
